All Questions
Tagged with ruby-on-railsobject-oriented
10 questions
4votes
2answers
141views
Ruby CLI TicTacToe
I have done Tictactoe game in Ruby. It is my first Object Oriented project in Ruby. I would like to separate all program into a few classes such as Player Board and Game. I want to use more OOP best ...
1vote
2answers
255views
Refactoring Ruby recharge REST API wrapper by using class variables
I am trying to create an API wrapper for recharge (A Shopify subscription service), I am using the HTTParty gem ...
2votes
2answers
201views
Modelling football teams and fixtures in Ruby (as compared to SQL)
I am trying to model information around football teams and fixtures. I am using the Premier League fantasy football API for my data. The fixtures API is here, and the team data (along with a lot of ...
1vote
1answer
716views
Creating an associated object on create/update
My app is setup where there are musical artists and albums have message boards through a has_one polymorphic association. ...
3votes
1answer
80views
Ensure multiple steps work/saving multiple models via a service
I just thought of something new re: saving multiple objects in Rails (though Rails is not necessary). Objectives: Create an author and a tomato, but both of those must be valid. If invalid creation, ...
1vote
1answer
57views
Old and new shouts controllers
I have a photo_shouts_controller.rb and text_shouts_controller.rb which both have almost similar implementations, and I would like to refactor it. I have implemented a refactoring but I am not too ...
3votes
1answer
48views
Classes for attributes validation
I have two classes responsible for attributes validation: ...
2votes
1answer
84views
Content management system for media
I have a content management system for an iOS app built with Rails. Right now there are three different types of content. The first two are just strings uploaded into a textfield by the user. One is ...
4votes
1answer
7kviews
Searching over more models rails
I'm trying to implement search over two models. In this example Book and Article. Here are the attributes from both of these : <...
2votes
1answer
192views
Duplicating Rails model for a form with meta-programming
Can someone please review my code: ...